package com.prs.crm.domain.oa;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.FlowEntity;
import com.prs.crm.domain.hr.Person;

@Entity
@Table(name="oa_knowledge")
public class Knowledge extends FlowEntity{

	private static final long serialVersionUID = 7045503175457463801L;
	
	@Id@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	@ManyToOne
	private KnowledgeType type;
	@ManyToOne
	private Person creator;
	private Date creattime;
	@Lob
	private String content;
	private Integer state;
	@ManyToOne(cascade = CascadeType.ALL)
	private Attachment attachment;
	@Column(length=500)
	private String remark;
	private String title;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public KnowledgeType getType() {
		return type;
	}
	public void setType(KnowledgeType type) {
		this.type = type;
	}


	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getTitle() {
		return title;
	}
	public void setAttachment(Attachment attachment) {
		this.attachment = attachment;
	}
	public Attachment getAttachment() {
		return attachment;
	}
	public void setCreattime(Date creattime) {
		this.creattime = creattime;
	}
	public Date getCreattime() {
		return creattime;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public Integer getState() {
		return state;
	}
	public void setCreator(Person creator) {
		this.creator = creator;
	}
	public Person getCreator() {
		return creator;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getContent() {
		return content;
	}


	
}
